home *** CD-ROM | disk | FTP | other *** search
- Function StrCon(Dest:PCHAR;Letter:Char;Width, Size:Integer):PCHAR;
- begin
- StrCon := Dest; { Return Dest }
- if Dest = NIL then EXIT; { Don't fill a NIL! }
- if Width >= Size then
- Width := Size; { Always keep in bounds - don't overwrite }
- ASM
- LES DI, Dest { Get Address of DEST in ES:DI }
- CLD { Set direction forward }
- MOV CX, Width { count in CX }
- MOV AL, Letter
- REP STOSB { make string of characters }
- MOV AL, 0 { Null Terminate }
- STOSB { and store }
- end
- end;
-
-
-